package edu.lingnan.lingnanblog.service;

import edu.lingnan.lingnanblog.entity.Comment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author wenchang
 * @since 2020/6/17 22:46
 */
@Component
@FeignClient(value = "LINGNANBLOG-PROVIDER-COMMENT")
public interface CommentClientService {
    @RequestMapping("comment/list")
    List<Comment> list(@SpringQueryMap Map<String, Object> map);

    @RequestMapping("comment/getTotal")
    Long getTotal(@SpringQueryMap Map<String, Object> map);

   @RequestMapping("comment/add")
    Integer add(@SpringQueryMap Comment comment);
/*
    @RequestMapping("comment/save")
    Integer update(@SpringQueryMap Link link);*/

    @RequestMapping("comment/review")
    Integer update(@SpringQueryMap Comment comment);

    @RequestMapping("comment/delete")
    Integer delete(@RequestParam("ids") int ids);
}
